[body]
<link href="/css/programm.css" rel="stylesheet" type="text/css">
<link href="/css/livesearch.css" rel="stylesheet" type="text/css">
<script src="/js/JsHttpRequest.js"></script>
<script src="/js/livesearch.js"></script>

<div id="head_fake"></div>
<div id="head_slide">
	<div id="add_day_block" style="float:left; width:200px; border-right: 1px dotted #AAAAAA; margin-right:10px;">
	  <a href="#" id="add_day_link" class="button" onClick="add_day_form(); return false;"><small>Add a day</small></a>
	  <div id="day_add_form" style="display:none;">
			<input type="text" placeholder="dd.mm.yyyy" id="add_date_field">
			<br>
			<a href="#" onclick="var tel=document.getElementById('add_date_field'); programm.add_day(tel.value); tel.value=''; add_day_form(); return false;">Apply</a>
			<a href="#" onClick="add_day_form(); return false;">Cancel</a>
		</div>
	</div>

	<div style="float:left; width:200px; border-right: 1px dotted #AAAAAA; margin-right:10px;">
		<a href="#" class="button orange" id="button_save" onClick="programm.save(); return false;">Save</a>
		<a href="#" class="button gray" id="button_delete" onClick="if( confirm('Are you really really really sure?!?!') ) programm.remove(); return false;">Delete</a>
	</div>
	
	<div style="float:left; width:200px; border-right: 1px dotted #AAAAAA; margin-right:10px;">
	  User:
		<select id="programmUser" onChange="set_user(this);" style="width:120px;">
		  {function:users_as_options}
		</select><br>
		<a href="/manage/users/{u_id}">back to user</a>
	</div>
	
	
	<!--
	<div style="float:left; width:200px;">
	  Package:
		<select id="programmPack" onChange="set_pack(this);" style="width:120px;">
  	  <option value="">no Pack set</option>
			<option value="comprehensive">Comprehensive</option>
		  <option value="medium">Medium</option>
		  <option value="light">Light</option>
		</select>
	</div>

		<a href="#" onClick="console.log(programm.data); return false;">Console data</a>
		<a href="#" onClick="programm.apply(); return false;">Apply struct</a>
	-->
</div>
<div id="programm">loading</div>

<div id="js_tpls" style="display:none;">
	<div id="js_programm">
		<div class="programm container">
			<div class="head">
			  <h3>Training program</h3>
			    <div style="float:left; width:10%; height:20px;">Date: </div>
			    <div style="float:left; width:100px;">
			      <span class="date txt" rel="date" data-format="date"></span>
					</div>
					<div class="clear"></div>

					<div style="float:left; width:10%; height:20px;">Deadline: </div>
			    <div style="float:left; width:100px;">
			    	<span class="deadline txt" rel="deadline" data-format="date"></span>
			    </div>
			    <div class="clear"></div>
			    
			    <div style="float:left; width:10%; height:70px;">Features: </div>
			    <div style="float:left; width:90%;">
			    	<span> {features_file} </span>
			    	<form enctype="multipart/form-data">
							<input type="file" name="features" id="features">
			    	</form>
			    </div>
			    <div class="clear"></div>
			</div>
			<div class="weeks list"></div>
		</div>
	</div>
	<div id="js_week">
	  <div class="week container">
	    <div class="head">
	    	<h2>WEEK <span class="date_from"></span> - <span class="date_to"></span></h2>
	    </div>
	    <div class="days list"></div>
	  </div>
	</div>
	<div id="js_day">
	  <div class="day">
	    <div class="head">
	      <span class="hidden" rel="id"></span>
	      <a href="#" class="remove_day">X</a>
		    <span class="date txt" rel="date" data-format="date"></span>
		    duration: <span class="dur txt" rel="dur"></span>
		    caloric V: <span class="col txt" rel="col"></span>
		    
		    <a href="#" class="open_close"></a>
			</div>
			<div class="body">
			  <img class="bottom_shadow" src="/img/bot_bg.png">
			  <div class="header">
			    <span class="img">Illustration</span>
			    <span class="name">Name</span>
			    <span class="repl">Reps</span>
			    <span class="steps">Sets</span>
			    <span class="rest">Rest</span>
			    <span class="comment">Comment</span>
			    <span class="order">Order</span>
				</div>
		  	<div class="exs list"></div>
		  	<a href="#" class="add_ex_link">add exercise</a>
		  	<img class="bottom_shadow" src="/img/top_bg.png">
		  </div>
	  </div>
	</div>
	<div id="js_ex">
	  <div class="ex container">
	    <a href="#" class="remove_ex">x</a>
	    <img src="" class="img">
	    <span class="hidden" rel="id">id</span>
	    <span class="hidden" rel="name">lib</span>
     <span class="name txt" rel="name">name</span>
	    <span class="repl txt" rel="repl">repl</span>
	    <span class="steps txt" rel="steps">steps</span>
	    <span class="rest txt" rel="rest">rest</span>
	    <span class="comment txt" rel="comment">comment</span>
	    <span class="order txt" rel="order">000</span>
	  </div>
	</div>
	<div id="js_ex_add">
	  <input type="text" class="sex" style="width:100%;" placeholder="Adding Exersize. Start typing exercise name.">
	</div>
</div>
<script>
	var json_data={json_data};
	console.log(json_data);
</script>
<script type="text/javascript" src="/js/programm.js"></script>